package org.imaginedays.androidall.http.async.example;

import org.imaginedays.androidall.http.async.AsyncHttpClient;
import org.imaginedays.androidall.http.async.AsyncHttpResponseHandler;
import org.imaginedays.androidall.http.async.RequestParams;

public class AndroidAllAsyncClientWapper {
	
	private static final String BASE_URL = "http://wiki.mbalib.com/wiki/";

	private static final AsyncHttpClient client = new AsyncHttpClient();
	
	  public static void get(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) {
	        client.get(getAbsoluteUrl(url), params, responseHandler);
	    }

	    public static void post(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) {
	        client.get(getAbsoluteUrl(url), params, responseHandler);
	    }

	    private static String getAbsoluteUrl(String relativeUrl) {
	        return BASE_URL + relativeUrl;
	    }
	
}
